package com.config;


import com.hs.mesj.socket.SocketService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author lnj
 * createTime 2018-11-07 22:25
 **/
@Component
class CommandLineRunnerImpl implements CommandLineRunner {
    public  static Log log = LogFactory.getLog(CommandLineRunnerImpl.class);
    @Override
    public void run(String... args) throws Exception {
        log.info("通过实现CommandLineRunner接口，在spring boot项目启动后打印参数");
        for (String arg : args) {
            log.info(arg + " ");
        }
        ContantValue.init();
        log.info(ContantValue.distValue);
        log.info("初始化默认数据完成");
        SocketService.runServer();

    }
}